The current USB defines four transmission modes: (1) control transfers, for control transfer commands and state operation, such as, configuring the device, obtaining device information, sending commands to device, and so on; each USB device having an endpoint 0, USB core is configured after device plug-in; (2) interrupt transfers, different from the general interruption, and requiring the host polling before execution to transfer a small amount of data at a fixed speed, such as, USB keyboard, mouse; (3) bulk transfer, for sending a large amount of data and requiring to guarantee data correctness, such as, transferring to flash drive, not restricted by speed limits; re-transmitting when the original transmission fails to guarantee data correctness; and (4) isochronous transfers, for sending a large amount of data without guaranteeing data correctness, such as, USB video device, best effort for stable transmission speed for audio and video; however, neither CRC nor re-transmission if frames are lost.
The transaction transfer indicates USB data transfer. The majority of transfer includes three types of packets: token packets, data packets, and handshake or status packets. The transaction transfer may be from the host outbound to the device, or from the device inbound to the host. The transfer direction is designated in the token packet. In general, the destination uses the handshake (status) packet to determine whether the transfer succeeds.
To ensure synchronization, USB divides the time into small intervals of fixed length. For example, the unit is 1 ms for low speed and full speed, called a frame; the frame is divided into 8 parts (with 0.125 ms as a unit), called a microframe. The start-of-frame (SOF) packet is a special packet, which is sent at the start of each frame.
The USB synchronous mode needs a clock CLK to drive the digital-analog-converter (DAC) and analog-digital-converter (ADC) in playing and recording, and the clock CLK must be synchronized with the USB data reception and transmission. For example, the clock CLK must be synchronized with the data stream speed transmitted from the USB host so as to avoid discontinuity, leading to discontinuous audio.
The earliest approach is to use a single phase-locked loop (PLL) to increase the frequency of the USB SOF (such as, 1 KHz for full speed, or 8 KHz for high speed) to 1024*48 KHz. However, with a single PLL increasing the USB SOF frequency, such as, from 1 KHz by 49152 times, the signal clock will tremble severely, causing noises in DAC and ADC.
The current USB AUDIO solution company proposed an adaptive mode, wherein the USB device uses two deep first-in-first-out (FIFO) buffers (with depth greater than 1000, for example) to respectively store data received from and to be transmitted to the USB host. Then, the controller dynamically adjusts the local clock synthesizer frequency to adjust the DAC/ADC speed so that the data depth in the buffers remains within a range (for example, default upper bound and lower bound), and controls the PLL clock CLK to adjust the access speed of the buffers to stay within a range. However, the adaptive mode has two disadvantages. The first is the dynamic adjustment of the clock synthesizer will cause larger timing jitter (usually larger than 200 ps) and lead to poor audio quality, and the second is that the deep buffers lead to playback delay.
For the current use of FIFO buffers, U.S. Pat. No. 7,715,513 “Data synchronization apparatus” disclosed a data synchronization apparatus comprising a FIFO register, a control circuit and a PLL; wherein the FIFO register receives and stores a plurality of data and provides a register adjustment signal according to the amount of data stored in the FIFO register; the data stored in the FIFO registers are transmitted to an external device at a clock rate obtained from a main clock signal; the control circuit provides an adjustment signal to PLL according to the adjustment signal of the FIFO register; and the PLL provides the main clock signal and adjusts the frequency of the main clock signal according to the PLL adjustment signal. In other words, the FIFO registers are used as buffers and then the speed of the PLL is adjusted to avoid discontinuity in USB playback.
Moreover, the USB audio method from Cypress Semiconductor Corp. also uses FIFO buffers and adjusts the PLL speed to avoid discontinuity in USB playback.
Taiwan Patent No. 1557573“Portable Storage Apparatus and Method Thereof, and Non-volatile Machine Readable Medium” disclosed a portable storage apparatus for obtaining a version of a first file from a first computation device and updating the first file in the portable storage apparatus to form an updated first file; then, the portable storage apparatus determining a version of the first file on a second computation device different from the updated first file in the portable storage apparatus and providing the updated first file to the second computation device; moreover, the portable storage apparatus determining a version of the first file on a remote storage service different from the updated first file and providing the updated first file to the remote storage service.
Taiwan Patent No. I544337 “Dual Operating System Architecture for USB Device and Method of USB device of Dual Operating System architecture disclosed a dual operating system architecture sharing USB device, comprising: a first operation system, a second operating system, a USB hub connected to a plurality of USB devices, and a switch for connecting the second operating system to the USB hub and cutting off connection between the first operating system and the USB hub when switching from the first operating system to the second operating system.
Taiwan Patent No. I540426“Dynamic Adjustment based on Hot Condition for Mobile Device” disclosed a mobile device able to monitor, by configuration, an environment, system or user event related to the mobile and/or a same-stage device. The occurrence of one or more events can trigger the adjustment of the system configuration. The mobile device is configurable to keep the frequently applications predicted based on the user's access most updated. The mobile device can receive push notification related to the applications, and the push notifications indicate new content to be downloaded by the applications. The mobile device can activate, in the background, the applications related to the push notifications to download the new content. Before executing an application or communicating with a same-stage device, the mobile device is configurable to check power in the mobile device and/or the same-stage device, data budget, and environment conditions to ensure a high-quality user experience.
Therefore, the issues remained to be solved include how to avoid large timing jitter of the signal when using a single PLL to increase the USB SOF frequency, such as from 1 KHz to 49152 times, causing large noise in DAC and ADC, as well as, how to avoid large timing jitter (>200 ps) and poor audio quality caused by dynamic adjustment of clock synthesizer when using adaptive mode, and avoid playback delay due to the use of deep buffers.